package com.leyou.item.service.port;

import com.leyou.common.vo.PageResult;
import com.leyou.item.dto.SkuDTO;
import com.leyou.item.dto.SpuDTO;
import com.leyou.item.dto.SpuDetailDTO;
import org.springframework.http.ResponseEntity;

import java.util.List;
import java.util.Map;

public interface IGoodsService {
    PageResult<SpuDTO> querySpuByPage(Integer page, Integer rows, Boolean saleable,String key);

    void saveGoods(SpuDTO spuDTO);

    SpuDetailDTO querySpuDetailById(Long spuId);

    List<SkuDTO> querySkuBySpuId(Long spuId);

    void updateGoods(SpuDTO spuDTO);

    void modifySaleable(Long spuId,Boolean saleable);

    SpuDTO querySpuById(Long id);

    List<SkuDTO> querySkuByIds(List<Long> ids);

    void minusStock(Map<Long, Integer> cartMap);

    void plusStock(Map<Long, Integer> cartMap);
}
